// document.createEvent('Event').timeStamp
document.createEvent = function (evtName) {
    if (evtName == 'Event') {
        return {
            timeStamp: Date.now + 100
        }
    }
}
// console
console.info = function (...msg) {
    console.log("info:", msg)
}
console.error = function (...msg) {
    console.log("error:", msg)
}

// SVG
class SVGElement extends Element { }
class HTMLElement extends Element {
    get hidden() { return this.state.hidden; }
    get isContentEditable() { return this.state.contenteditable; }
    // and so on
}

// TODO: add specific properties and methods
class HTMLDocument extends Document { }
class HTMLAnchorElement extends HTMLElement { }
class HTMLAreaElement extends HTMLElement { }
class HTMLAudioElement extends HTMLElement { }
class HTMLBaseElement extends HTMLElement { }
class HTMLBodyElement extends HTMLElement { }
class HTMLBRElement extends HTMLElement { }
class HTMLButtonElement extends HTMLElement { }
class HTMLCanvasElement extends HTMLElement { }
class HTMLContentElement extends HTMLElement { }
class HTMLDataElement extends HTMLElement { }
class HTMLDataListElement extends HTMLElement { }
class HTMLDetailsElement extends HTMLElement { }
class HTMLDialogElement extends HTMLElement { }
class HTMLDivElement extends HTMLElement { }
class HTMLDListElement extends HTMLElement { }
class HTMLEmbedElement extends HTMLElement { }
class HTMLFieldSetElement extends HTMLElement { }
class HTMLFontElement extends HTMLElement { }
class HTMLFormElement extends HTMLElement { }
class HTMLFrameSetElement extends HTMLElement { }
class HTMLHeadElement extends HTMLElement { }
class HTMLHeadingElement extends HTMLElement { }
class HTMLHRElement extends HTMLElement { }
class HTMLHtmlElement extends HTMLDocument { }
class HTMLIFrameElement extends HTMLElement { }
class HTMLImageElement extends HTMLElement { }
class HTMLInputElement extends HTMLElement { }
class HTMLKeygenElement extends HTMLElement { }
class HTMLLabelElement extends HTMLElement { }
class HTMLLegendElement extends HTMLElement { }
class HTMLLIElement extends HTMLElement { }
class HTMLLinkElement extends HTMLElement { }
class HTMLMapElement extends HTMLElement { }
class HTMLMarqueeElement extends HTMLElement { }
class HTMLMediaElement extends HTMLElement { }
class HTMLMenuElement extends HTMLElement { }
class HTMLMenuItemElement extends HTMLElement { }
class HTMLMetaElement extends HTMLElement { }
class HTMLMeterElement extends HTMLElement { }
class HTMLModElement extends HTMLElement { }
class HTMLObjectElement extends HTMLElement { }
class HTMLOListElement extends HTMLElement { }
class HTMLOptGroupElement extends HTMLElement { }
class HTMLOptionElement extends HTMLElement { }
class HTMLOutputElement extends HTMLElement { }
class HTMLParagraphElement extends HTMLElement { }
class HTMLParamElement extends HTMLElement { }
class HTMLPictureElement extends HTMLElement { }
class HTMLPreElement extends HTMLElement { }
class HTMLProgressElement extends HTMLElement { }
class HTMLQuoteElement extends HTMLElement { }
class HTMLScriptElement extends HTMLElement { }
class HTMLSelectElement extends HTMLElement { }
class HTMLShadowElement extends HTMLElement { }
class HTMLSlotElement extends HTMLElement { }
class HTMLSourceElement extends HTMLElement { }
class HTMLSpanElement extends HTMLElement { }
class HTMLStyleElement extends HTMLElement { }
class HTMLTableCaptionElement extends HTMLElement { }
class HTMLTableCellElement extends HTMLElement { }
class HTMLTableColElement extends HTMLElement { }
class HTMLTableElement extends HTMLElement { }
class HTMLTableRowElement extends HTMLElement { }
class HTMLTableSectionElement extends HTMLElement { }
class HTMLTemplateElement extends HTMLElement { }
class HTMLTextAreaElement extends HTMLElement { }
class HTMLTimeElement extends HTMLElement { }
class HTMLTitleElement extends HTMLElement { }
class HTMLTrackElement extends HTMLElement { }
class HTMLUListElement extends HTMLElement { }
class HTMLUnknownElement extends HTMLElement { }
class HTMLVideoElement extends HTMLElement { }

// add them to global namespace 
Object.assign(globalThis, {
    HTMLElement,
    HTMLDocument,
    HTMLAnchorElement,
    HTMLAreaElement,
    HTMLAudioElement,
    HTMLBaseElement,
    HTMLBodyElement,
    HTMLBRElement,
    HTMLButtonElement,
    HTMLCanvasElement,
    HTMLContentElement,
    HTMLDataElement,
    HTMLDataListElement,
    HTMLDetailsElement,
    HTMLDialogElement,
    HTMLDivElement,
    HTMLDListElement,
    HTMLEmbedElement,
    HTMLFieldSetElement,
    HTMLFontElement,
    HTMLFormElement,
    HTMLFrameSetElement,
    HTMLHeadElement,
    HTMLHeadingElement,
    HTMLHRElement,
    HTMLHtmlElement,
    HTMLIFrameElement,
    HTMLImageElement,
    HTMLInputElement,
    HTMLKeygenElement,
    HTMLLabelElement,
    HTMLLegendElement,
    HTMLLIElement,
    HTMLLinkElement,
    HTMLMapElement,
    HTMLMarqueeElement,
    HTMLMediaElement,
    HTMLMenuElement,
    HTMLMenuItemElement,
    HTMLMetaElement,
    HTMLMeterElement,
    HTMLModElement,
    HTMLObjectElement,
    HTMLOListElement,
    HTMLOptGroupElement,
    HTMLOptionElement,
    HTMLOutputElement,
    HTMLParagraphElement,
    HTMLParamElement,
    HTMLPictureElement,
    HTMLPreElement,
    HTMLProgressElement,
    HTMLQuoteElement,
    HTMLScriptElement,
    HTMLSelectElement,
    HTMLShadowElement,
    HTMLSlotElement,
    HTMLSourceElement,
    HTMLSpanElement,
    HTMLStyleElement,
    HTMLTableCaptionElement,
    HTMLTableCellElement,
    HTMLTableColElement,
    HTMLTableElement,
    HTMLTableRowElement,
    HTMLTableSectionElement,
    HTMLTemplateElement,
    HTMLTextAreaElement,
    HTMLTimeElement,
    HTMLTitleElement,
    HTMLTrackElement,
    HTMLUListElement,
    HTMLUnknownElement,
    HTMLVideoElement,
});